﻿using System.Data;

namespace Shopping.Entities
{
    /// -----------------------------------------------------------------------------
    ///<summary>
    /// The Info class for the PromotionProductInfo
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class PromotionProductInfo
    {
        #region Private Members
		
        private int _productId;
        private int _promotionId;
        private double _promotionPercent;
        #endregion
        #region Constructors
        // initialization

        #endregion
        #region Public Properties
        /// <summary>
        /// Get and Set Property Data of File column ProductId in Table PromotionProduct 
        /// </summary>
				
        public int ProductId
        {
            get{ return _productId; }
            set{ _productId = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column PromotionId in Table PromotionProduct 
        /// </summary>
				
        public int PromotionId
        {
            get{ return _promotionId; }
            set{ _promotionId = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column PromotionPercent in Table PromotionProduct 
        /// </summary>
				
        public double PromotionPercent
        {
            get{ return _promotionPercent; }
            set{ _promotionPercent = value; }
        }
				
        #endregion		
		
        #region IHydratable Implementation

        /// <summary>
        /// 
        /// </summary>        
        public void Fill(IDataReader oReader)
        {
            _productId=int.Parse(oReader["ProductId"].ToString());
            _promotionId=int.Parse(oReader["PromotionId"].ToString());
            _promotionPercent=double.Parse(oReader["PromotionPercent"].ToString());
        }
        #endregion
    }
}